package com.gec.controller;

import com.gec.domain.Dept;
import com.gec.domain.Role;
import com.gec.domain.User;

import java.util.HashMap;
import java.util.Map;


/**
 * @author Aniki
 */
public class UserData {

    //{ps}把使用到的用户存入 Map 中。
    public static Map<String, User> initData(){
        Map users = new HashMap();
        Dept top = new Dept("d01","总经办");
        Dept dept = new Dept("d02","财务部");

        Role rBoss = new Role("r02","leader");
        Role rLeader = new Role("r02","leader");
        Role rEmp = new Role("r05","employee");

        User uBoss = new User("u03","boss",top,rBoss);
        User uLeader = new User("u06","kellen",dept,rLeader);
        User uEmp1 = new User("u07","terry",dept,rEmp);
        User uEmp2 = new User("u08","yuanFang",dept,rEmp);

        users.put("boss", uBoss);
        users.put("kellen", uLeader);
        users.put("terry", uEmp1);
        users.put("yuanFang", uEmp2);
        return users;
    }

}
